﻿<?xml version="1.0" encoding="utf-8" ?>

<Content type="xform" name="WebSettings">
   <model>
     <instance>
       <web>
        <add key="Membership" value="on" />
        <add key="NonAuthenticatedUsersGroupId" value="7" />
        <add key="AuthenticatedUsersGroupId" value="8" />
        <add key="RegisterBehaviour" value="" />
        <add key="RegisterRedirectPageId" value="0" />
        <add key="ActivityLogging" value="" />
        <add key="IPLogging" value="" />
		    <add key="SingleLoginSessionPerUser" value="off" />
		    <add key="SingleLoginSessionTimeout" value="900" />
        <add key="SecureMembershipAddress" value="" />
        <add key="SecureMembershipDomain" value="" />
        <add key="MemberCodes" value="" />
         <add key="SecureDownloads" value="off" />
	   </web>
    </instance>
    <submission id="WebSettings" action="" method="post" event="form_check(this)" />
      <bind id="ewMembership" nodeset="web/add[@key='Membership']/@value" required="true()" type="string" />
	    <bind id="MembershipEncryption" nodeset="web/add[@key='MembershipEncryption']/@value" required="true()" type="string" />
      <bind id="LogonRedirectPath" nodeset="web/add[@key='LogonRedirectPath']/@value" required="false()" type="string" />
      <bind id="NonAuthenticatedUsersGroupId" nodeset="web/add[@key='NonAuthenticatedUsersGroupId']/@value" required="false()" type="string" />
	    <bind id="AuthenticatedUsersGroupId" nodeset="web/add[@key='AuthenticatedUsersGroupId']/@value" required="false()" type="string" />
      <bind id="ewIPLogging" nodeset="web/add[@key='IPLogging']/@value" required="true()" type="string" />
      <bind id="ewMemberCodes" nodeset="web/add[@key='MemberCodes']/@value" required="true()" type="string" />
      <bind id="ewActivityLogging" nodeset="web/add[@key='ActivityLogging']/@value" required="true()" type="string" />
	    <bind id="RegisterBehaviour" nodeset="web/add[@key='RegisterBehaviour']/@value" required="false()" type="string" />
	    <bind id="RegisterRedirectPageId" nodeset="web/add[@key='RegisterRedirectPageId']/@value" required="false()" type="string" />
	    <bind id="SingleLoginSessionPerUser" nodeset="web/add[@key='SingleLoginSessionPerUser']/@value" required="false()" type="string" />
	    <bind id="SingleLoginSessionTimeout" nodeset="web/add[@key='SingleLoginSessionTimeout']/@value" required="false()" type="string" />
      <bind id="SecureMembershipAddress" nodeset="web/add[@key='SecureMembershipAddress']/@value" required="false()" type="string" />
      <bind id="SecureMembershipDomain" nodeset="web/add[@key='SecureMembershipDomain']/@value" required="false()" type="string" />
     <bind id="SecureDownloads" nodeset="web/add[@key='SecureDownloads']/@value" required="false()" type="string" />
   </model>
   <group ref="WebSettings">
    <label>Membership Settings</label>

    <alert>Changes you make to this form risk making this site non-functional.</alert>
     <group>
     <select1 bind="ewMembership" appearance="full">
      <label>Membership</label>
       <item>
        <label>On</label>
        <value>on</value>
      </item>
       <item>
        <label>Off</label>
        <value>off</value>
      </item>
      <value>on</value>
    </select1>
     
	   <select1 bind="MembershipEncryption" appearance="full">
		   <label>Membership Encryption</label>
       <alert>DO NOT change this once the site is live as all historic user accounts will have invalid passwords. Please contact Eonic to encode passwords on bulk.</alert>
		   <item>
			   <label>None</label>
			   <value>plain</value>
		   </item>
		   <item>
			   <label>MD5</label>
			   <value>MD5</value>
		   </item>
       <item>
         <label>MD5 salt</label>
         <value>Md5salt</value>
       </item>
		   <item>
			   <label>SHA1</label>
			   <value>SHA1</value>
		   </item>
       <item>
         <label>SHA256</label>
         <value>SHA256</value>
       </item>
		   <value />
	   </select1>
	   <input bind="LogonRedirectPath">
		   <label>Logon Redirect Path</label>
		   <value />
	   </input>
	 <select1 bind="NonAuthenticatedUsersGroupId"  class="ewQuery" query="Directory.Group" appearance="minimal">
		<label>Non Authenticated Users Group Id</label>
		<hint>Permissions Group for anyone not logged on</hint>
		<value />
	 </select1>
	 <select1 bind="AuthenticatedUsersGroupId"  class="ewQuery" query="Directory.Group" appearance="minimal">
		<label>Authenticated Users Group Id</label>
		<hint>Permissions Group for anyone logged on</hint>
		<value />
	 </select1>
     <select1 bind="RegisterBehaviour" appearance="full">
       <label>Register Behaviour</label>
       <item>
         <label>Auto Login</label>
         <value>Auto</value>
       </item>
       <item>
         <label>Validate By Email</label>
         <value>validateByEmail</value>
       </item>
       <value />
     </select1>
     <select1 bind="RegisterRedirectPageId"  class="ewQuery" query="SiteTree" appearance="minimal">
       <label>Register Redirect Page Id</label>
     </select1>
     </group>
     <group class="inline">
       <label>User Activity Tracking</label>
       <select1 bind="ewActivityLogging" appearance="full">
       <label>Activity Logging</label>
       <item>
         <label>On</label>
         <value>on</value>
       </item>
       <item>
         <label>Off</label>
         <value>off</value>
       </item>
       <value />
     </select1>
     <select1 bind="ewIPLogging" appearance="full">
       <label>IP Tracking</label>
       <item>
         <label>On</label>
         <value>on</value>
       </item>
       <item>
         <label>Off</label>
         <value>off</value>
       </item>
       <value />
     </select1>
       <select1 bind="ewMemberCodes" appearance="full">
         <label>Member Codes</label>
         <item>
           <label>On</label>
           <value>on</value>
         </item>
         <item>
           <label>Off</label>
           <value>off</value>
         </item>
         <value />
       </select1>
    
     </group>

     <group>
         <label>Single User Security Settings</label>
	   <select1 bind="SingleLoginSessionPerUser" appearance="full">
		   <label>Restrict user access so a single user account can not access the site with 2 concurrent sessions</label>
		   <item>
			   <label>Yes</label>
			   <value>on</value>
		   </item>
		   <item>
			   <label>No</label>
			   <value>off</value>
		   </item>
		   <value />
		   <hint>While a username is logged in, you can opt to not let that username be used for logins on any other machines or browser sessions.</hint>
	   </select1>

       <select1 bind="SecureDownloads" appearance="full">
         <label>Secure Downloads</label>
         <item>
           <label>On</label>
           <value>on</value>
         </item>
         <item>
           <label>Off</label>
           <value>off</value>
         </item>
         <hint>Check the user has access to a page that the download file is published on.</hint>
       </select1>
       
	   <input bind="SingleLoginSessionTimeout">
		   <label>Timeout for single user access (seconds)</label>
		   <value />
		   <hint>If the above feature is turned on you can specify (in seconds) how much inactivity to account for before allowing the username to be logged into elsewhere</hint>
	   </input>
     </group>
     <group>
       <label>Secure Membership Settings</label>
     <input bind="SecureMembershipAddress">
       <label>Secure Membership URL</label>
       <value />
       <hint>This should be the site URL in the format of "https://www.mysite.com" this will ensure that all users when logged on access the site over https</hint>
     </input>
     <input bind="SecureMembershipDomain">
       <label>Secure Membership Domain</label>
       <value />
       <hint>This should be the site domain in the format of "mysite.com" this is the domain cookies get stored against, leave this blank by default only use in special curcumstances (un-tested in latest release).</hint>
     </input>
   </group>
    <submit submission="" ref="submit" class="principle">
      <label>Save Membership Settings</label>
    </submit>
  </group>
</Content>
